```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kafka消费者偏移量管理指南</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f9fafb;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6b21a8 0%, #4c1d95 100%);
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            background-color: #1e293b;
            border-left: 4px solid #7c3aed;
        }
        .highlight {
            position: relative;
        }
        .highlight::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 30%;
            background-color: rgba(124, 58, 237, 0.1);
            z-index: -1;
        }
        .mermaid {
            background-color: white;
            padding: 1.5rem;
            border-radius: 0.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
    </style>
</head>
<body class="antialiased">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 lg:py-32">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col lg:flex-row items-center">
                <div class="lg:w-1/2 mb-10 lg:mb-0">
                    <span class="inline-block px-3 py-1 bg-purple-800 rounded-full text-sm font-medium mb-4 tracking-wider">
                        <i class="fas fa-database mr-2"></i>Kafka技术深度解析
                    </span>
                    <h1 class="text-4xl lg:text-5xl font-bold leading-tight mb-6 font-serif">
                        Kafka消费者偏移量管理
                    </h1>
                    <p class="text-lg lg:text-xl text-purple-100 mb-8">
                        深入探索Kafka消费者如何高效、可靠地管理消息偏移量，确保数据处理的精确性与一致性。
                    </p>
                    <div class="flex space-x-4">
                        <a href="#content" class="px-6 py-3 bg-white text-purple-900 font-medium rounded-lg hover:bg-opacity-90 transition duration-300">
                            开始阅读 <i class="fas fa-arrow-down ml-2"></i>
                        </a>
                    </div>
                </div>
                <div class="lg:w-1/2 lg:pl-10">
                    <div class="bg-white bg-opacity-10 p-6 rounded-xl border border-white border-opacity-20 backdrop-blur-sm">
                        <div class="mermaid">
                            graph LR
                            A[Consumer] -->|Poll Messages| B[Kafka Broker]
                            B --> C[Partition 0]
                            B --> D[Partition 1]
                            B --> E[Partition 2]
                            A -->|Commit Offset| F[__consumer_offsets]
                            F -->|Store| G[Offset Metadata]
                            style A fill:#7c3aed,stroke:#fff,color:#fff
                            style F fill:#6b21a8,stroke:#fff,color:#fff
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-5xl px-4 py-12" id="content">
        <!-- Overview Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center mr-4">
                    <i class="fas fa-book text-purple-700 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800 font-serif">消费者偏移量管理概述</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                <div class="p-6 md:p-8">
                    <p class="text-lg text-gray-700 mb-6">
                        在 Kafka 中，消费者偏移量（<span class="font-bold text-purple-700">offset</span>）是指消费者读取到 Kafka <span class="font-bold text-purple-700">Partition</span> 中的消息的位置。偏移量管理是 Kafka 消费者的重要部分，它决定了消费者从哪里开始读取消息。
                    </p>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div class="bg-purple-50 p-5 rounded-lg border border-purple-100">
                            <div class="flex items-center mb-3">
                                <div class="w-8 h-8 rounded-full bg-purple-200 flex items-center justify-center mr-3">
                                    <i class="fas fa-robot text-purple-700"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-purple-800">自动提交</h3>
                            </div>
                            <p class="text-gray-700">
                                消费者自动提交它的偏移量，简单易用但可能在消费者崩溃时导致消息重复消费。
                            </p>
                        </div>
                        <div class="bg-blue-50 p-5 rounded-lg border border-blue-100">
                            <div class="flex items-center mb-3">
                                <div class="w-8 h-8 rounded-full bg-blue-200 flex items-center justify-center mr-3">
                                    <i class="fas fa-hand-paper text-blue-700"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-blue-800">手动提交</h3>
                            </div>
                            <p class="text-gray-700">
                                消费者显式地提交它的偏移量，确保消息处理完成后才提交，适合高可靠性场景。
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Storage Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
                    <i class="fas fa-database text-blue-700 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800 font-serif">消费者偏移量存储</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                <div class="p-6 md:p-8">
                    <p class="text-lg text-gray-700 mb-6">
                        Kafka 的消费者偏移量默认是存储在 Kafka 的内部 <span class="font-mono bg-gray-100 px-2 py-1 rounded text-purple-700">__consumer_offsets</span> 主题中。每个消费者在该主题中有一个对应的分区，存储该消费者的偏移量。
                    </p>
                    
                    <div class="code-block text-gray-200 rounded-lg overflow-hidden mb-6">
                        <div class="px-5 py-3 bg-gray-800 flex items-center">
                            <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-green-500"></div>
                            <span class="ml-4 text-sm text-gray-400">OffsetStorage.java</span>
                        </div>
                        <pre class="p-5 overflow-x-auto"><code>// Kafka 内部的 __consumer_offsets 主题
public class OffsetStorage {
    public void storeOffset(String consumerGroup, String topic, int partition, long offset) {
        // 在 __consumer_offsets 主题中保存消费者的偏移量
        // 使用消费者组，主题名，分区和偏移量来存储
        KafkaProducer producer = new KafkaProducer(config);
        producer.send(new ProducerRecord("__consumer_offsets", consumerGroup, topic, partition, offset));
    }
}</code></pre>
                    </div>
                    
                    <div class="bg-blue-50 p-5 rounded-lg border border-blue-200">
                        <div class="flex items-start">
                            <i class="fas fa-info-circle text-blue-600 text-xl mr-3 mt-1"></i>
                            <div>
                                <h4 class="font-semibold text-blue-800 mb-2">关键点</h4>
                                <p class="text-gray-700">
                                    <span class="highlight">__consumer_offsets</span> 主题在 Kafka 中充当了消费者偏移量的存储角色，确保即使消费者崩溃或重启，消费者的进度也不会丢失。
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Auto Commit Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center mr-4">
                    <i class="fas fa-cogs text-green-700 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800 font-serif">自动提交偏移量</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                <div class="p-6 md:p-8">
                    <p class="text-lg text-gray-700 mb-6">
                        在 Kafka 中，消费者默认启用自动提交偏移量。每当消费者消费一条消息时，它会自动提交该消息的偏移量。这种方式适用于许多场景，但在某些情况下，如消费者崩溃，可能会导致消息的重复消费。
                    </p>
                    
                    <div class="code-block text-gray-200 rounded-lg overflow-hidden mb-6">
                        <div class="px-5 py-3 bg-gray-800 flex items-center">
                            <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-green-500"></div>
                            <span class="ml-4 text-sm text-gray-400">AutoCommitExample.java</span>
                        </div>
                        <pre class="p-5 overflow-x-auto"><code>// 消费者配置自动提交偏移量
Properties props = new Properties();
props.put("enable.auto.commit", "true");
props.put("auto.commit.interval.ms", "1000");  // 自动提交的间隔时间

KafkaConsumer&lt;String, String&gt; consumer = new KafkaConsumer&lt;&gt;(props);
consumer.subscribe(Collections.singletonList("my-topic"));
while (true) {
    ConsumerRecords&lt;String, String&gt; records = consumer.poll(Duration.ofMillis(100));
    for (ConsumerRecord&lt;String, String&gt; record : records) {
        System.out.println(record.value());
    }
}</code></pre>
                    </div>
                    
                    <div class="grid md:grid-cols-2 gap-6 mt-8">
                        <div class="bg-green-50 p-5 rounded-lg border border-green-200">
                            <h4 class="font-semibold text-green-800 mb-3 flex items-center">
                                <i class="fas fa-check-circle mr-2"></i> 优点
                            </h4>
                            <ul class="text-gray-700 space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2 text-sm"></i>
                                    <span>实现简单，无需额外代码</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2 text-sm"></i>
                                    <span>适用于大多数不要求精确一次处理的场景</span>
                                </li>
                            </ul>
                        </div>
                        <div class="bg-red-50 p-5 rounded-lg border border-red-200">
                            <h4 class="font-semibold text-red-800 mb-3 flex items-center">
                                <i class="fas fa-exclamation-circle mr-2"></i> 缺点
                            </h4>
                            <ul class="text-gray-700 space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-times text-red-500 mt-1 mr-2 text-sm"></i>
                                    <span>消费者崩溃可能导致消息重复消费</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-times text-red-500 mt-1 mr-2 text-sm"></i>
                                    <span>提交间隔可能导致消息处理与提交不同步</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Manual Commit Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center mr-4">
                    <i class="fas fa-hand-paper text-orange-700 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800 font-serif">手动提交偏移量</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                <div class="p-6 md:p-8">
                    <p class="text-lg text-gray-700 mb-6">
                        在一些对数据一致性要求较高的场景下，Kafka 允许消费者手动提交偏移量。这样可以确保消费者在处理消息后才提交偏移量，防止在处理过程中出现异常时偏移量被提前提交，导致消息丢失。
                    </p>
                    
                    <div class="code-block text-gray-200 rounded-lg overflow-hidden mb-6">
                        <div class="px-5 py-3 bg-gray-800 flex items-center">
                            <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-green-500"></div>
                            <span class="ml-4 text-sm text-gray-400">ManualCommitExample.java</span>
                        </div>
                        <pre class="p-5 overflow-x-auto"><code>// 手动提交偏移量
Properties props = new Properties();
props.put("enable.auto.commit", "false");

KafkaConsumer&lt;String, String&gt; consumer = new KafkaConsumer&lt;&gt;(props);
consumer.subscribe(Collections.singletonList("my-topic"));
while (true) {
    ConsumerRecords&lt;String, String&gt; records = consumer.poll(Duration.ofMillis(100));
    for (ConsumerRecord&lt;String, String&gt; record : records) {
        System.out.println(record.value());
    }
    // 手动提交偏移量
    consumer.commitSync();
}</code></pre>
                    </div>
                    
                    <div class="grid md:grid-cols-2 gap-8 mt-8">
                        <div>
                            <h4 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                                <i class="fas fa-sync-alt text-blue-500 mr-3"></i> 同步提交
                            </h4>
                            <p class="text-gray-700 mb-4">
                                <span class="font-mono bg-gray-100 px-2 py-1 rounded">commitSync()</span> 方法会阻塞直到偏移量提交完成。
                            </p>
                            <div class="bg-blue-50 p-4 rounded-lg">
                                <p class="text-blue-800">
                                    <i class="fas fa-info-circle mr-2"></i> 适用于需要确保提交成功的场景，但会降低吞吐量
                                </p>
                            </div>
                        </div>
                        <div>
                            <h4 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
                                <i class="fas fa-bolt text-purple-500 mr-3"></i> 异步提交
                            </h4>
                            <p class="text-gray-700 mb-4">
                                <span class="font-mono bg-gray-100 px-2 py-1 rounded">commitAsync()</span> 方法提交偏移量时不会阻塞消费者线程。
                            </p>
                            <div class="bg-purple-50 p-4 rounded-lg">
                                <p class="text-purple-800">
                                    <i class="fas fa-info-circle mr-2"></i> 适用于高吞吐量场景，但可能需要额外处理提交失败
                                </p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mt-8">
                        <div class="code-block text-gray-200 rounded-lg overflow-hidden">
                            <div class="px-5 py-3 bg-gray-800 flex items-center">
                                <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                                <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                                <div class="w-3 h-3 rounded-full bg-green-500"></div>
                                <span class="ml-4 text-sm text-gray-400">AsyncCommitExample.java</span>
                            </div>
                            <pre class="p-5 overflow-x-auto"><code>// 异步提交偏移量
consumer.commitAsync((offsets, exception) -> {
    if (exception != null) {
        System.err.println("Commit failed for " + offsets);
    }
});</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Offset Recovery Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <i class="fas fa-redo text-indigo-700 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800 font-serif">消费者偏移量的恢复</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                <div class="p-6 md:p-8">
                    <p class="text-lg text-gray-700 mb-6">
                        在 Kafka 中，消费者的偏移量是持久化的。即使消费者崩溃或重启，它也可以从 <span class="font-mono bg-gray-100 px-2 py-1 rounded">__consumer_offsets</span> 主题中恢复它的偏移量。当消费者重新启动时，它会读取该偏移量，并从该位置继续消费消息。
                    </p>
                    
                    <div class="code-block text-gray-200 rounded-lg overflow-hidden mb-6">
                        <div class="px-5 py-3 bg-gray-800 flex items-center">
                            <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-green-500"></div>
                            <span class="ml-4 text-sm text-gray-400">OffsetRecovery.java</span>
                        </div>
                        <pre class="p-5 overflow-x-auto"><code>// 恢复消费者偏移量
public long getLastCommittedOffset(String consumerGroup, String topic, int partition) {
    // 从 __consumer_offsets 主题中获取最后提交的偏移量
    KafkaConsumer&lt;String, String&gt; consumer = new KafkaConsumer&lt;&gt;(props);
    consumer.subscribe(Collections.singletonList(topic));
    ConsumerGroupOffsets offsets = consumer.position(new TopicPartition(topic, partition));
    return offsets.offset();
}</code></pre>
                    </div>
                    
                    <div class="mermaid mt-8">
                        sequenceDiagram
                            participant Consumer
                            participant Broker
                            participant OffsetsTopic
                            Consumer->>Broker: 启动消费者
                            Broker->>OffsetsTopic: 查询消费者组的最新偏移量
                            OffsetsTopic-->>Broker: 返回偏移量
                            Broker-->>Consumer: 返回偏移量位置
                            Consumer->>Broker: 从偏移量位置开始消费
                    </div>
                </div>
            </div>
        </section>

        <!-- Strategy Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-teal-100 flex items-center justify-center mr-4">
                    <i class="fas fa-chess-knight text-teal-700 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800 font-serif">Kafka消费者的Offset位移策略</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                <div class="p-6 md:p-8">
                    <p class="text-lg text-gray-700 mb-8">
                        Kafka 消费者有多种偏移量管理策略，不同的策略适用于不同的业务场景，开发者需要根据具体的业务需求选择合适的策略。
                    </p>
                    
                    <div class="grid md:grid-cols-3 gap-6">
                        <div class="bg-teal-50 p-5 rounded-lg border border-teal-200">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-teal-200 flex items-center justify-center mr-3">
                                    <i class="fas fa-robot text-teal-700"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-teal-800">自动提交</h3>
                            </div>
                            <p class="text-gray-700 mb-3">
                                默认方式，适用于大多数应用场景，简单易用。
                            </p>
                            <ul class="text-sm text-gray-600 space-y-1">
                                <li class="flex items-start">
                                    <i class="fas fa-check text-teal-500 mt-1 mr-2"></i>
                                    <span>设置 enable.auto.commit=true</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-teal-500 mt-1 mr-2"></i>
                                    <span>通过 auto.commit.interval.ms 控制频率</span>
                                </li>
                            </ul>
                        </div>
                        
                        <div class="bg-indigo-50 p-5 rounded-lg border border-indigo-200">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-indigo-200 flex items-center justify-center mr-3">
                                    <i class="fas fa-hand-paper text-indigo-700"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-indigo-800">手动提交</h3>
                            </div>
                            <p class="text-gray-700 mb-3">
                                适用于需要高可靠性和事务性的场景。
                            </p>
                            <ul class="text-sm text-gray-600 space-y-1">
                                <li class="flex items-start">
                                    <i class="fas fa-check text-indigo-500 mt-1 mr-2"></i>
                                    <span>设置 enable.auto.commit=false</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-indigo-500 mt-1 mr-2"></i>
                                    <span>使用 commitSync() 或 commitAsync()</span>
                                </li>
                            </ul>
                        </div>
                        
                        <div class="bg-purple-50 p-5 rounded-lg border border-purple-200">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-purple-200 flex items-center justify-center mr-3">
                                    <i class="fas fa-calendar-alt text-purple-700"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-purple-800">定期提交</h3>
                            </div>
                            <p class="text-gray-700 mb-3">
                                适用于消费者长期运行的场景，减少消费进度的延迟。
                            </p>
                            <ul class="text-sm text-gray-600 space-y-1">
                                <li class="flex items-start">
                                    <i class="fas fa-check text-purple-500 mt-1 mr-2"></i>
                                    <span>结合定时任务提交</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-purple-500 mt-1 mr-2"></i>
                                    <span>平衡性能和可靠性</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    
                    <div class="mt-8">
                        <div class="code-block text-gray-200 rounded-lg overflow-hidden">
                            <div class="px-5 py-3 bg-gray-800 flex items-center">
                                <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                                <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                                <div class="w-3 h-3 rounded-full bg-green-500"></div>
                                <span class="ml-4 text-sm text-gray-400">BatchCommitExample.java</span>
                            </div>
                            <pre class="p-5 overflow-x-auto"><code>// 批量提交偏移量
public void commitOffsets(List&lt;TopicPartition&gt; partitions) {
    consumer.commitAsync(partitions, OffsetCommitCallback { (offsets, exception) ->
        // 批量提交完成的回调
    })
}</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto max-w-5xl px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-6 md:mb-0">
                    <h3 class="text-xl font-bold text-white mb-2">技术小馆</h3>
                    <p class="text-gray-400">专注于高质量的技术内容分享</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-purple-300 hover:text-white transition duration-300 flex items-center">
                        <i class="fas fa-external-link-alt mr-2"></i> http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500 text-sm">
                &copy; 2023 技术小馆. 保留所有权利.
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```